#include <iostream>
#include <string>
using namespace std;
string str;

int main() {
    cin >> str;
    int left = 0 , right = 0 , n = str.size();
    int retL = 0 , retR = 0;
    while(right <= n)
    {
        if(right == n||str[right] < '0' || str[right] > '9')
        {
            if(right-left > retR-retL)
            {
                retL = left , retR = right;
            }
            right++;
            left = right;
            continue;
        }
        right++;
    }
    for(int i = retL ; i < retR ; ++i) cout << str[i];
    cout << endl;
}
// 64 位输出请用 printf("%lld")